﻿@model Ecommerce.Models.BreadcrumbViewModel[]

<ol class="breadcrumb">
    @foreach (var level in Model)
    {
        <li class="@(level.IsActive ? "active" : "")" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
            <a href="@level.Url" title="@level.Text" itemprop="url">
                @if (string.IsNullOrEmpty(level.HeadingTag))
                {
                    <span itemprop="title">@level.Text</span>
                }
                else
                {
                    @Html.Raw(string.Format("<{0} itemprop=\"title\">{1}</{0}>", level.HeadingTag, level.Text))
                }
            </a>
        </li>
    }
</ol>